<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="org.apache.struts.Globals"%>
<%@ page import="java.io.PrintWriter"%>
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%>
<%
	String path = request.getContextPath();
	request.setAttribute("path", path);
	String rootPath = request.getContextPath();
	Exception ex = (Exception) request.getAttribute(Globals.EXCEPTION_KEY);
%>
<html>
	<head>
		<html:base />
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>系统信息</title>
		<link media="all" href="style.css" rel="stylesheet" type="text/css" />

		<script language="javascript" src="report.js" type="text/javascript"></script>
		<script language="javascript" type="text/javascript">
                     function showDetail(){
                        var detailinfo  = document.getElementById("detail");
                        var showlink    = document.getElementById("showlink");
                        if(detailinfo.style.display == "none")
                        {
                            detailinfo.style.display = "block";
                            showlink.innerHTML="隐藏";
                        }
                        else if(detailinfo.style.display == "block" || detailinfo.style.display == "")
                        {
                            detailinfo.style.display = "none";
                            showlink.innerHTML="查看";
                        }
                    }
                
        </script>
	</head>
	<body>
		<table align="center" border="0" height="100%">
			<tr>
				<td align="center">

					<table class="table" align="center">
						<tr>
							<td>
								<table width="100%" border="0" align="center">
									<tr>
										<td width="147" rowspan="2" align="center">
											<img src="${path}/common/error/images/system_error.gif"
												alt="错误提示" />
										</td>
										<td width="433" height="94" valign="middle" align="left">
											<div>
												系统消息：系统在处理您的操作时发生错误。
											</div>
											<div>
												错误描述：
													 <%
												 		if (ex != null && ex.getLocalizedMessage() != null) {
												 			out.println(ex.getLocalizedMessage());
												 		}
													 %>
											</div>
										</td>
									</tr>
									<tr>
										<td colspan="2" height="20" align="left">
											<span><a
												style="cursor:pointer;color:blue;font-weight:bold;"
												onclick="showDetail();"> 点击此处<span id="showlink">查看</span>详细错误信息</a>，请联系系统管理员以解决此问题。</span>
										</td>
									</tr>
									<tr>
										<td colspan="2">
											<div id="detail" style="display:none;">
												<%
													if (ex != null) {
														ex.printStackTrace(new PrintWriter(out));
													}
												%>
											</div>
										</td>
									</tr>
									<tr>
										<td align="right" colspan="2">
											<br />
											<a href="javascript:window.history.go(-1);" id="backLink">返回</a>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>

				</td>
			</tr>
		</table>
	</body>
</html>
